package org.september.pisces.led.entity;

import org.september.pisces.led.service.LEDManager;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import net.minidev.json.annotate.JsonIgnore;
import org.september.smartdao.anno.AutoIncrease;
import org.september.smartdao.anno.Entity;
import org.september.smartdao.anno.Id;


/**
 * led 主体信息
 */
@Entity
@Data
@Table("led")
public class Led {

    @Id
    @AutoIncrease
    @IsKey
    @IsAutoIncrement
    @Column(value = "id", length = 20)
    private Long id;

    @Column(value = "host", comment = "情报板ip", length = 32)
    private String host;

    @Column(value = "port", comment = "情报板端口", length = 11)
    private Integer port;

    @Column(value = "enable_flag", type = MySqlTypeConstant.SMALLINT, comment = "是否启用,1启0关")
    private Integer enableFlag; // 1是启用

    @Column(value = "plan_id", comment = "方案id", length = 20)
    private Long planId;


    private transient LedPlan plan;
    @JsonIgnore
    private transient LEDManager manager;
    private transient String planName;

}
